<?php

namespace api\modules\v1\controllers;
use Yii;
class UcenterThirdController extends UcenterController
{
    public $modelClass = 'api\modules\v1\models\UcenterThird';

    public function behaviors() {
        if(in_array(Yii::$app->controller->action->id,['header','index','article','fans','attention','about'])){
            $this->_is_auth = false;
        }
        return parent::behaviors();
    }

    /*
     * 头部信息
     */
    public function actionHeader(){
        $model = new $this->modelClass();
        $data = $model->layout_info();
        $data['is_gz'] = $model->getGz() == true ? '1' : '0';
        return $data;
    }

    /*
     * 相关领域云号
     */
    public function actionAbout(){
        $model = new $this->modelClass();
        $data = $model->about();
        return $data;
    }
}